package com.hbnu.exercise.object;

public class PersonDemo
{
    public static void main(String[] args)
    {
        Teacher teacher = new Teacher();
        Student student = new Student();

        teacher.SetAge(25);
        teacher.SetName("王茂权");

        student.SetAge(18);
        student.SetName("葛久恒");

        System.out.println(teacher.GetAge());
        System.out.println(teacher.GetName());

        System.out.println(student.GetAge());
        System.out.println(student.GetName());
        System.out.println();
        teacher.Teach();
        student.Study();
        System.out.println();
        teacher.Eat();
        student.Eat();
        System.out.println();
        teacher.Speaking();
        student.Speaking();
        System.out.println();

        Person teacher2 = new Teacher();
        Person student2 = new Student();

        teacher2.Eat();
        student2.Eat();
    }
}